package ratiocalc;

public class DivisionByZeroException extends Exception{

	public Ratio r;
	String s;

	 public DivisionByZeroException()
	 {
	  s = ("Denominator must not be zero");
	 }
	 public DivisionByZeroException(String s)
	 {
		this.s = s;
	  
	 }
	 
	 public DivisionByZeroException (Ratio r) {
	 
	 s = "Division by Zero occured while" +
	" trying to divide by " +r.getNumerator()+"/"+r.getDenominator();
	 this.r = r;
	 
	 }
	
	public String getMessage()
	{
		return s;
	}
}
